/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7fa;
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
}

.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 24px;
    text-decoration: none;
    font-weight: bold;
}

.post-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.post-form h2 {
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
}

.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.btn:hover {
    background: #2980b9;
}

.post {
    background: rgb(233, 254, 250);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    padding: 20px;
    transition: transform 0.3s ease;
}

/* 放大 */
.post:hover {
    transform: scale(1.03);
}

/* 移动设备适配 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        max-width: 100%;
        margin: 10px auto;
    }

    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }

    .post-form {
        padding: 15px;
        margin-bottom: 20px;
    }

    .post {
        padding: 15px;
        margin-bottom: 15px;
    }

    .post-title {
        font-size: 16px;
    }

    .form-group input,
    .form-group textarea,
    .comment-form input {
        padding: 8px;
        font-size: 14px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .post-actions {
        gap: 10px;
    }

    /* 移除移动设备上的悬停放大效果 */
    .post:hover {
        transform: none;
    }
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-right: 10px;
}

.post-author {
    font-weight: 600;
}

.post-time {
    color: #777;
    font-size: 14px;
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.post-content {
    margin-bottom: 15px;
}

.post-actions {
    display: flex;
    gap: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    color: #555;
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
    font-size: 14px;
}

.action-btn i {
    margin-right: 5px;
}

.comment-section {
    margin-top: 15px;
}

.comment-form {
    display: flex;
    margin-bottom: 15px;
}

.comment-form input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
}

.comment-list {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.comment {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 8px;
}